{% extends "admin/base_site.html" %}
{% load admin_modify adminmedia %}

{% block extrahead %}
{{ block.super }}
{{ media }}
{% endblock %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}

{% block coltype %}colMS{% endblock %}

{% block bodyclass %} change-form{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url admin:index %}">Home</a> &nbsp;&rsaquo;&nbsp;
    <a href="{% url list_languages %}">Language Control Panel</a>&nbsp;&rsaquo;&nbsp; 
    
    <a href="{% url view_language language_code %}">{{ language_name }}</a> &nbsp;&rsaquo;&nbsp;
        {{ line_number }}
</div>
{% endblock %}

{% block content %}
<h1>Translate to {{ language_name }}</h1>

<div id="content-main">
    {% block object-tools %}
    {% endblock %}

    <div>
    <form action="." method="post" enctype="multipart/form-data">{% csrf_token %}

        <fieldset class="module aligned {{ fieldset.classes }}">
            {% for field in form.visible_fields %}
                <div class="form-row">
                    {{ field.errors }}
                    {{ field.label_tag }}{{ field }}
                    {% if field.field.help_text %}<p class="help">{{ field.field.help_text|safe }}</p>{% endif %}
                </div>
            {% endfor %}
            {% for field in form.hidden_fields %}
            {{ field }}
            {% endfor %}

        </fieldset>
        <input type="submit" value="Save" />
    </form>
    </div>
    <p>
        <div class="module filtered" id="changelist">
        <div id="changelist-filter">
            <h2>Files</h2>
            
            <table cellspacing="0" style="margin-top: 20px;" width="100%">
            <thead>
                <tr>
                    <th>File</th>
                    <th>Line number</th>
                </tr>
            </thead>
                {% for section in current_block.section_list %}
                    <tr class="{% cycle 'row1' 'row2' %}">
                        <td>{{ section.filename }}</td>
                        <td>{{ section.line_number }}</td>
                    </tr>
                {% endfor %}

            </table>
        </div>
    </div>
    
    
</div>
{% endblock %}